package org.jspresso.framework.view.descriptor.cardView;

import javax.security.auth.Subject;

import org.jspresso.framework.view.descriptor.IViewDescriptor;
import org.jspresso.framework.view.descriptor.basic.BasicCardViewDescriptor;

public class ActionTestIoTypeCarViewDescriptor extends BasicCardViewDescriptor {
	
	IViewDescriptor defaultView = null;
	
	@Override
	public String getCardNameForModel(Object model, Subject subject) {
		if(model != null)
			return model.getClass().getCanonicalName();
		else return null;
	}

	@Override
	public IViewDescriptor getCardViewDescriptor(String cardName) {
		if(cardName != null) {
		return getDefaultView();
		}
		return null;
	}

	public IViewDescriptor getDefaultView() {
		return defaultView;
	}

	public void setDefaultView(IViewDescriptor defaultView) {
		this.defaultView = defaultView;
	}
	
}
